package com.jgy;

import com.jgy.spring.bean.eventandlistener.Customer1;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.io.Resource;
import org.springframework.core.io.support.ResourcePatternResolver;

import java.io.IOException;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @author 姜光远
 * @date 2023/3/3 16:43
 */
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
public class StudyApplication {

    public static void main(String[] args) throws IOException {


        ConfigurableApplicationContext context = SpringApplication.run(StudyApplication.class);

        //监听解耦
        Customer1 bean = new Customer1();
        //context.publishEvent(bean.event(context));
        String event = bean.event(context);
        System.out.println("event = " + event);


        //defaultListableBeanFactory

    }
}
